import matplotlib.pyplot  as plt
from randow_walk import RandomWalk

while True:
    #创建一个RandomWalk的实例
    rw = RandomWalk()
    rw.fill_walk()

    #将所有的点都绘制出来
    plt.style.use('classic')
    fig,ax = plt.subplots()
    point_numbers = range(rw.num_points)
    ax.scatter(rw.x_values,rw.y_values,c=point_numbers,cmap=plt.cm.Reds,edgecolors='none',s=15)
    plt.show()

    keep_running = input("Y/N?")
    if keep_running == 'N':
        break
